import request from '@/utils/request'


const sysSubscribeApi = {

}

/**
 * 根据手机号获取预约人数据
 * @param data
 * @returns {AxiosPromise}
 */

sysSubscribeApi.list = data => {
  return request({
    url: '/sysSubscribe/subscribe/page',
    method: 'post',
    data
  })
}



/**
 * 将商品加入预约表中
 * @param data
 * @returns {AxiosPromise}
 */
sysSubscribeApi.add = data => {
  return request({
    url: '/sysSubscribe/subscribe/add',
    method: 'post',
    data
  })
}

/**
 * 删除指定商品
 * @param data
 * @returns {AxiosPromise}
 */
sysSubscribeApi.delete = id => {
  return request({
    url: '/sysSubscribe/subscribe/delete/' + id,
    method: 'post'
  })
}

/**
 * 批量删除
 * @param data
 * @returns {AxiosPromise}
 */
sysSubscribeApi.deletebatch = data => {
  return request({
    url: '/sysSubscribe/subscribe/delete/batch',
    method: 'post',
    data
  })
}



/**
 * 根据id获取预约表详细信息
 * @param data
 * @returns {AxiosPromise}
 */
sysSubscribeApi.detail = id => {
  return request({
    url: '/sysSubscribe/subscribe/detail/info/' + id,
    method: 'get'
  })
}

/**
 * 更新预约表中商品
 * @param data
 * @returns {AxiosPromise}
 */
sysSubscribeApi.update = data => {
  return request({
    url: '/sysSubscribe/subscribe/update',
    method: 'post',
    data
  })
}


export default sysSubscribeApi
